package com.itheima.staticmethod;

//静态方法设计工具类
public class VerifyCodeUtil {

    //工具类没有创建对象的需求，所以建议将构造方法私有
    private VerifyCodeUtil() {

    }

    public static String getVerifyCode() {
        String code = "";
        for (int i = 0; i < 4; i++) {
            int num = (int) (Math.random() * 10);
            code += num;
        }
        return code;
    }
}
